added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2010 / CSASPNETReverseAJAX / Dispatcher.asmx.cs
blobefb867ba9c314493eae9630592c5b363a9320483
1 /****************************** Module Header ******************************\
2 * Module Name: Dispatcher.asmx.cs
3 * Project: CSASPNETReverseAJAX
4 * Copyright (c) Microsoft Corporation
6 * This web service is designed to be called by the Ajax client.
7 *
8 * This source is subject to the Microsoft Public License.
9 * See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
10 * All other rights reserved.
12 \*****************************************************************************/
14 using System.Web.Services;
16 namespace CSASPNETReverseAJAX
18 /// <summary>
19 /// This web service contains methods that help dispatching events to the client.
20 /// </summary>
21 [WebService(Namespace = "http://tempuri.org/")]
22 [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
23 [System.ComponentModel.ToolboxItem(false)]
24 [System.Web.Script.Services.ScriptService]
25 public class Dispatcher : System.Web.Services.WebService
27 /// <summary>
28 /// Dispatch the new message event.
29 /// </summary>
30 /// <param name="userName">The loged in user name</param>
31 /// <returns>the message content</returns>
32 [WebMethod]
33 public string WaitMessage(string userName)
35 return ClientAdapter.Instance.GetMessage(userName);